write test results in file