Freezer code error help

So I thought I would post the changes that I saw so that if anyone else is having troubles like mine that they can see it.
he main difference between the two codes is that I originally had a function in a function. I needed to declare my subroutines separately by putting naming them void Nighttime() and void Daytime(). This takes them out of the main routine named void loop().
Another addition was in the setup where temperatureC was defined as a float. Naming this as a float makes the Temperature a value with a decimal point. I read that a floating point math is alot slower then integer math, but since I'm not doing that much math with the temperature value this should be ok.
I have gone through the code and made sure i entered all the {} onto their own lines and used the auto format. This is teaching me alot and I appreciate your help.

The next step is getting it to write to an SD card as well as display it (right now on serial monitor, next on LCD screen). I have the Data logger shield from Adafruit http://www.ladyada.net/make/logshield/lighttemp.htmland had it logging data with the light and temperature logging sketch from GitHub. I then have taken some of the code and tried to implement it in my sketch. I got it compiling fine with no errors. But now it is not showing anything on the serial port, or logging any data to the SD card. Any Ideas?

#include <Wire.h>
#include "RTClib.h"
#define NIGHTHIGH -19
#define NIGHTLOW -21
#define DAYHIGH -4
#define DAYLOW -6
#define aref_voltage 3.3

// For Data Logging
#include <SD.h>
#define SYNC_INTERVAL 1000 // mills between calls to flush() - to write data to the card
uint32_t syncTime = 0; // time of last sync()
#define LOG_INTERVAL  1000 // mills between entries (reduce to take more/faster data)
#define ECHO_TO_SERIAL   1 // echo data to serial port
#define WAIT_TO_START    0 // Wait for serial input in setup()
const int chipSelect = 10;
File logfile;

RTC_DS1307 RTC;

int tempReading;
int tempPin = 1;
int photocellReading;
int photocellPin = 2;
int relayPin = 7;
float temperatureC;

void setup() 
{
  Serial.begin(9600);           // sets Bud rate to 9600
  Wire.begin();
  pinMode(relayPin, HIGH);      // sets relay pin as output
  analogReference(EXTERNAL);

  //everything below in this loop is for data logging
  char filename[] = "LOGGER00.CSV";   //Create new file on SD card
  for (uint8_t i = 0; i < 100; i++) 
  {
    filename[6] = i/10 + '0';
    filename[7] = i%10 + '0';
    if (! SD.exists(filename))         // only open a new file if it doesn't exist
    {   
      logfile = SD.open(filename, FILE_WRITE); 
    }
  }
  logfile.println("Light,Temp,Datetime,Setting");  // Create these headings in the log (excel) file
}

void loop()
{
  photocellReading = analogRead(photocellPin);  //Get the reading from the sensor

  if (photocellReading < 10)   //Thresholds for Photocell
  {        
    Serial.println("Dark");
  } 
  else if (photocellReading < 200) 
  {
    Serial.println("Dim");
  } 
  else if (photocellReading < 500) 
  {
    Serial.println("Light");
  } 
  else if (photocellReading < 800) 
  {
    Serial.println("Bright");
  } 
  else 
  {
    Serial.println("Very bright");
  }

  tempReading = analogRead(tempPin);  

  // converting that reading to voltage, which is based off the reference voltage
  float voltage = tempReading * aref_voltage / 1024; 

  // now print out the temperature
  float temperatureC = (voltage - 0.5) * 100 ;  //converting from 10 mv per degree wit 500 mV offset
  //to degrees ((volatge - 500mV) times 100)
  Serial.print(temperatureC); 
  Serial.println(" degrees C");

  logfile.print(", ");                        //Logging the photocell and temp
  logfile.print(photocellReading);
  logfile.print(", ");    
  logfile.print(temperatureC);

  DateTime now = RTC.now();                   // Get time from the RTC chip

  logfile.print('"');                         //Logging the Date and Time
  logfile.print(now.year(), DEC);
  logfile.print("/");
  logfile.print(now.month(), DEC);
  logfile.print("/");
  logfile.print(now.day(), DEC);
  logfile.print(" ");
  logfile.print(now.hour(), DEC);
  logfile.print(":");
  logfile.print(now.minute(), DEC);
  logfile.print(":");
  logfile.print(now.second(), DEC);
  logfile.print('"');

  Serial.print("Time:");
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  Serial.print(now.second(), DEC);
  Serial.println();

  
  delay((LOG_INTERVAL -1) - (millis() % LOG_INTERVAL)); // delay for the amount of time between readings
  
  uint32_t m = millis();      // log milliseconds since starting
  logfile.print(m);           // milliseconds since start
  logfile.print(", ");     

  if ((millis() - syncTime) < SYNC_INTERVAL) return;
  syncTime = millis();

  delay(1000);

  if ((now.hour() >= 7) && (now.hour() <= 19))   //If time is between 7am and 7pm print Day time setting)
  {
    Daytime();
    Serial.println("Temp set to -5'C");    // Display what Setting we are currently in
    logfile.print(",");
    logfile.print("Daytime setting = -5'C");
  }
  else                                     //Else set to Night time setting  
  {                                 
    Nighttime();
    Serial.println("Temp set to -20'C");      // Display what Setting we are currently in
    logfile.print(",");
    logfile.print("Daytime setting = -20'C");
  }

}

void Nighttime()  
{                     
  if (temperatureC > NIGHTHIGH)  //Check temp and compare with setting and set the output accordingly
  { 
    digitalWrite(relayPin, HIGH);
  }
  else if (temperatureC < NIGHTLOW)
  {
    digitalWrite(relayPin, LOW);
  }
}

void Daytime()
{
  if (temperatureC > DAYHIGH)  //Check temp and compare with setting and set the output accordingly
  { 
    digitalWrite(relayPin, HIGH);
  }
  else if (temperatureC < DAYLOW)
  {
    digitalWrite(relayPin, LOW);
  }


}

As an aside - Im asking about code, but if I should be posting in the project guidance section just let me know. And for intrest sake, I attached a picture of the circuit and datalogger shield with the Arduino.