fixing bug in cache dir reading