prefer BufferedWriter
NXCM-5302 - Protect against staging.xml corruption