Added retry to catch network hiccoughs.