writeHeader

Writes the trace header as the first line. Must be called exactly once, before any write.