Added delay response detection and error catching