xml will be undefined if dump_xml failed, linking to the above comment