measurement is written to file