added error reporting system