generator: write header even with null loader