In the commit message you say that we need this method to be able do delete the lock file and retry the failing operation. But wouldn't it be
safer to call this classes "unlock()" method instead? That method also tries to delete the lock file. It looks cleaner to me to add a static unlock(File f) method than to expose the File. With a file in hand you can do things (e.g. changing the content, rename) which you don't need and which may be harmful.