Add an option to enable debugging. If not set, only show the error message. If set, show the entire stack trace.