Improved error logging in TTY unit-test.