added simple error reporting