Corrected logging of messages
Corrected implementation of TestError exception