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

The point is, the TeraTerm file data are permanently recorded so you don't miss anything.

do I need to have an ending point to then close the file? Or can the file continuously open and close as data logs?

To get the last data block, you have to close the SD file. You do not want to be continuously opening and closing the file as that slows the process way down and also leads to read/write errors.

Open the file once in setup(), and close it only when you are done writing. Take this out of loop():

  //    if (! SD.exists(filename)) {
  //       only open a new file if it doesn't exist
  logfile = SD.open("TESTFILE.CSV", FILE_WRITE);
  //      break;  // leave the loop! Unable to open and write to file
  //    }