added error reporting framework