Changed Environment output to write XML