     return; 
   }
   Serial.println("card initialized.");
+  getNewFileName();
 }
 
 void loop() {

#include <SD.h>
#include <SPI.h>

void setup() {
  

}

/*
gives a new filename so we can open a new file each time
no failure code, defaults to run0fv.txt
*/
void getNewFileName() {
  Serial.println("started to get filename");
  strncpy(strFileName, "run0.txt", fileNameSize);
  int nameSize = 0;
  for(int i = 0; SD.exists(strFileName); nameSize = sprintf(strFileName, "run%d.txt", i)) {
    //catch potential overflow with the name size then we have an issue.
    //so we write to the file "runOvf.txt"
    Serial.print("checking filename ");
    Serial.println(strFileName);
    if(nameSize > 12) {
      strncpy(strFileName, "runOfv.txt", fileNameSize);
      return;
    }
   i++;
  }
  Serial.println("Got filename");
  return;
}

/*
Filename MUST be <=8 characters (not including the file extension) or the
file will not be created
*/
bool sdWrite(String data) {
  File dataFile = SD.open(strFileName, FILE_WRITE);
  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(data);
