Again, I think there is a race condition here.  We're relying on being able to open the file and close it quickly before another process tries to create the same lock.