Never close a file while there exist a lock on the file.