updates to error reporting logic;