write output header after file initialization