After GET releases shared file lock and before migration acquires exclusive file lock a DELETE can acquire the lock and delete the file. Then the migration recreates the deleted file, which shouldn't happen. Probably best fix is to upgrade GET's shared lock to exclusive lock and pass it to the migration function