added more detailed error messages and steps in the opening of both input and result files; added the ability to create parent subdirectories when opening result files; added ERROR and WARNING to begining of all error/warning messages