Makes key file generation optional.