log error on exception