fixing segmenter script to do both segmentations and to detect bad data files