now can save segmentation to file