Do not generate an incomplete XML file when there are errors.
https://github.com/rSmart/rsmart_toolbox/issues/2