make keyfile optional