Refactored the initialize on error_report.