could not open XML to write