The command open() adds additional newlines which when paired with csv.DictWriter functions causes blank rows to appear in csv files. This is potentially problematic because even though this can be fixed with newline='', it may break Linux builds. Needs further investigation.