The purpose of the separate lock file is twofold.

1. In the case that a file does not already exist, a lockfile is created to block other processes from attempting to create the same file.
2. In the case that a file is being read by one or more processes, a process that would otherwise be blocked from writing to that file while it is being read may create a lockfile to prevent subsequent read requests from blocking the write.