adding logging on caught exceptions so we can see the underlying error