A few tweaks for proper creation of CSV files