Header-only write fix