Instead of writing a new file for every agentResult, can we instead buffer the coverage data and then write it all out before exiting?