Default headerGenerator to a default function that returns an empty
slice.  This removes the need for the nil check in logHeader()