redirect the stdout of tests to file