fix bug for cache directory