Add test ouput to file when test fails