Updated report and added writing to file