Added writeReporttoXML, need more work