added download retry when connection is lost