Check that lockfile exists before deleting it