Sometimes, due to contention a directory may not be created for tiles to be stored or a tile may not be generated. Therefore, attempt to retry directory and tile generation up to MAX_RETRY_ATTEMPTS. Only then do we bail out.