add more debugging context with env when program is terminated