Another fix for empty xml output issue. Fix overwriting of the xml file.