write_report function

Write a report to the file system