You will be happy to learn that I do use flock on opening the file so there is no danger of what you describe happening.
in reply to Re^2: Ensuring only one copy of a perl script is running at a time (race)
in thread Ensuring only one copy of a perl script is running at a time
Rather than locking a file for the duration of the script, I simply lock it while changing its status etc. As posted, this allows me greater flexibility to post more info than just in use/not in use by using the file content to write codes to. Thanks anyway!