added error reporting back