Add stacktrace to terminate error catch log