Write the test results into a file