Added deleting locked-file function