fixing the cacheprint to output valid CSV format