Add retry logic, give up after 3 tries.