Added check for error_reporting