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