centralise the error_reporting in one place, in init