Re-implemented LockFile as class meant for inheritance.