write header