Adding method to split internal data on unique namespaces and write to files