Add retry mechanism