Add write_fields feature