Added environment error_report switching.