fixes keyfile use