only write when editing