Updated to make use of the revised input arguments of planMerge. Now pass scansV, dosesV, structsV and fileName to planMerge.