File locking

Create a temp file for file locking
In case LOCK_NB checks that acquired lock is blocked