adding bad-XML catch and error report