remove debug printing in write_attributes.