Put try finally to delete lock file