add basic error reporting