Magical error fix. Headers and other rogue lines will no longer crash
the program or be left in the output file.