write when save a tag