writeToFile

Writes the accumulated report to a file at path and returns a File reference.