File locking

Create a temp file for file locking