Data is not being written into SD card
You start logging set to LOW and then test if it is high, since it isn't you go to the else clause, you call exit(0) and kill your processor, hence your code never gets executed!

volatile boolean logging = LOW;

...

void loop() 
{ 
   if(logging == HIGH) // starts low
   {
    ... // never executed
   }
   else 
   {
    ... // 
    exit(0); // now your Arduino is dead!
   }
}


The ellipses (...) are where i snipped your code out.

exit(0) turns off interrupts and loops forever with while(1); which has the effect of a full, power-consuming halt; exit(0) should have a sleep call in it, because what exit(...) does isn't very useful for an Arduino!