Force flush/close of written XML data