implemented keyfile