writing test results to a file