Header writing module modification
Get rid of error for empty sets and add header writer