Added some error handling to the xml parsers.  Output goes to file instead of stdout