Corrected path output on error.
Use the one file object, much cleaner.