Change download retrying to use exceptions.