better logging on a handler error