Use the `csv` module to write CSV files instead of raw IO
csv module provides better performance, escaping, and interface than directly parsing or writing CSV files. In particular, joining lines before writing is highly inefficient.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information