Exception handling for Character file IO