only write header line once