fix the exception wrapping logging