Use a buffered writer when writing headers