test that keyfile can be None