orig_config_xml.sync() is fine, above 3 lines can be replaced.