make writer cleanup sorted index when updating