only lock if unlink is called for a file