added log for error