Not sure why, but before I added the `if` block I got an `undefined method `each' for nil:NilClass` if `$add_header` was left empty.
Will add array validation.