Fixed problem trying to open invalid user-specified file