Add logging with error and stack on uncaughtException.