print proper stack traces for exceptions