fixed testwriter so that it prints better results