Fixed logging issue which produced a wrong error message and stopped the tests on each failure