refactor IniParser.writeFile into writeIniToFile