adding support to log errors from the SAXParser
multiple fixes and improvements