Latest changes to MergeIO function