Fixed a bug when cache folder doesn't exist.