Allow to set the number of retries