Print the header in the csv file only once, set the debug messages
at debug() level, make the argument check case insensitive,
avoid printing duplicate \n.