Advanced test cases for KeyFile
Some error handling