.csv File being created on SD card, no data within file

Use a Serial Terminal program (i.e. NOT the Arduino IDE) that logs everything to a file, that way you can review it afterwards and dont miss important stuff.

I use TeraTerm.