write headers to generic writer