Additional error message for key file
Misc. improvements