       int topDigit = uuidNumber[i] >> 4;
       int bottomDigit = uuidNumber[i] & 0x0f;
       // Print high hex digit
+#if DEBUG
+      Serial.print( "0123456789ABCDEF"[topDigit]);
+      Serial.print("0123456789ABCDEF"[bottomDigit]);
+#endif
       dataFile.print( "0123456789ABCDEF"[topDigit] );
       // Low hex digit
       dataFile.print( "0123456789ABCDEF"[bottomDigit] );
     }
+#if DEBUG
+    Serial.println();
+#endif
+
+    dataFile.close();
   }
 }
 

    // take a number of analog samples and add them up
    while (sample_count < NUM_VOLTAGE_SAMPLES) {
        sum += analogRead(A3);
        sample_count++;
        delay(10);
    }
    // use 5.0 for a 5.0V ADC reference voltage
    // 5.015V is the calibrated reference voltage
    voltage = ((float)sum / (float)NUM_VOLTAGE_SAMPLES * 5.05) / 1024.0;
    sample_count = 0;
    sum = 0;
    
    // send voltage for display on Serial Monitor
    // voltage multiplied by 11 when using voltage divider that
    // divides by 11. 11.132 is the calibrated voltage divide
    // value
#if DEBUG
    Serial.print(voltage * 11.133);
    Serial.println (" V");
#endif    
 

  Serial.begin(9600);
#endif

  //set up sd card
  sd_setup();

