Fixed bug in TSF writer caused by output file being closed in between commits
Fixed bug in TSF writer caused by output file being closed in between commits

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3