Fix printing out error message when test fails and run with -bb