For loop with 10 retries, not infinite while loop.