Add file opening and closing to time measurement
Measure pure writing AND total. Do prettyprint