added unlink to release the lock