Added key file format selector
Bugfixes