added command for generating external keyfile + extraction with external key file.