output the stacktrace for exceptions