Handle exceptions when opening a inputed file.