Fixed error when cache directory does not exists;