Enhanced logging for test.