Better download resume logic