error not defined error - Changed line 336 from error to fail