updated recursive dir parsing code and generating cache file