Unlock the current file when exiting the application.