   pinMode(10, OUTPUT);
 
   if (!SD.begin(chipSelect)) { // see if the card is present and can be initialized:
-    Serial.println("Card failed, or not present");
+    Serial.println(F("Card failed, or not present"));
     return; // don't do anything more.
   }
 

  temperatures.push(czr.Celsius());
  humidity.push(czr.Humidity());
  CO2.push(czr.CO2());
}
// Logging of measurements
void logData(){
  // String tableHeader = "Time,Temperature (low),Temperature,Temperature (high),Humidity (low),Humidity,Humidity (high),CO2 (low),CO2,CO2 (high)";
  // String sTime = getTimeString();

  // // Get the lowest, average and highest measurements of the last logging interval for temperature, humidity and CO2:
  // String sTemperatureMin = floatToString( temperatures.minimum() );
  // String sTemperatureAvg = floatToString( temperatures.mean() );
  // String sTemperatureMax = floatToString( temperatures.maximum() );
  // String sHumidityMin = floatToString( humidity.minimum() );
  // String sHumidityAvg = floatToString( humidity.mean() );
  // String sHumidityMax = floatToString( humidity.maximum() );
  // String sCO2Min = floatToString( CO2.minimum() );
  // String sCO2Avg = floatToString( CO2.mean() );
  // String sCO2Max = floatToString( CO2.maximum() );

  // // Combine all values in a string.
  // String dataString = sTime + "," + sTemperatureMin + "," + sTemperatureAvg + "," + sTemperatureMax + "," + sHumidityMin + "," + sHumidityAvg + "," + sHumidityMax + "," + sCO2Min + "," + sCO2Avg + "," + sCO2Max; // Append all measurements to the string

  Serial.println("opening dataFile");
  File dataFile;
  dataFile = SD.open("datalog.csv", FILE_WRITE);// Create file if it doesn't already exist.
  dataFile.close();
  dataFile = SD.open("datalog.csv"); // Open the file
  if (dataFile) {
    char chars[3];
    String content;
    int i = 0;
    while( i < 3 ){
      chars[i] = dataFile.read();
      int j = chars[i];

      Serial.println( "chars[i]: ");
      Serial.println( chars[i] );
      if (j != -1){ // When end of file is reached, -1 is returned.
        content += String(chars[i]);
        Serial.println( "content: ");
        Serial.println( content );
      }
      i++;
    }
    if (content.length() == 0){
      Serial.println("File is empty, adding header");
      dataFile.close();
      dataFile = SD.open("datalog.csv", FILE_WRITE);
      dataFile.println("hoi");
    }
    if (content == "hoi"){
      Serial.println("File has header.");
      dataFile.close();
      dataFile = SD.open("datalog.csv", FILE_WRITE);
      dataFile.println("doeg!");
    }
    if ((content != "hoi") && (content.length() > 0)){
      Serial.println("datalog.csv has unexpected contents. Logging won't start.");
    }
    dataFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening datalog.csv");
  }
}
/****************************
 Functions called from Loop
/****************************/

// Converts floats into strings.
String floatToString(float f){
  char buff[10];
