Use cacheDir variable everywhere needed