tweak test failure output. write to a temp file not stdout. test still fails because expected is not just an identical copy of input