Remember to close the lockfile