catch errors from xml2json