Write using the len variable we set up rather than the struct element.