Added option to keep segmentation file.