 }
 
 // This function append a time stamp to the string passed as argument
-void addTimeStamp(String &string) {
+String addTimeStamp() {
+  String result;
   Process time;
   time.begin("date"); 
   time.addParameter("+%D-%T");

    dataFile.println(dataString);
    dataFile.close();
    // print to the serial port too:
    Console.println(dataString);
  }  
  // if the file isn't open, pop up an error:
  else {
    Console.println("error opening datalog.txt");
  } 
  
  delay(15000);

  while(time.available()>0) {
    char c = time.read();
    if(c != '\n')
      result += c;
  }
}
