added a test for outputing the errors