fixed outputdatamatrixfile for when subunits are passed