I am trying to open a file, and I would like to return e.g. X if the filepath does not exist, Y if the file can\'t be opened, and Z if it was successful.
However, I c