Improvements to report.txt generation