added flush_xml into xml_handler2.hpp for better debugging