Fix test cases for error events
Change console output format, improve maintainability
Improve console output