checking errors.