Allow stack trace printing to be optional