Only locks on file modification

This update ensures that the file only locks when it is modified, allowing normal use of Cmd+P etc.

Thanks for the great plugin! Helped us a lot!