I don't see anywhere in this code the specific error condition is cleared.