writing segment changes to disk