Add loop to retry several times