Consolidate log_exception into single call at entry point and enable stact with --debug