log exception in catch block