Let me start with a warning, this links to some less than pleasant photographs of some ones mistake with a motorcycle. It is a few years old and likely has been seen by many, but for the new rider or bike owner, it is a warning that these machines are like power tools, if your not 100% sure what your doing is correct, ask a question or take it to someone to do for you.
There is no reason to have the engine running while you’re touching the chain.