added log output only on failure