Print stacktrace when handling error