Modifying the output to create a .csv that matches the input

We should probably handle this better (well, the whole thing kinda sucks right now), but this will do for now