write header to output file