synching sd reader to atlas ph output

void PrintToSD()  // this function saves the data to the SD card
{
  File datafile = SD.open("pHdatalogger.txt", FILE_WRITE);
  if (datafile)
  {
    datafile.print(pH);
    datafile.print(",");
  }
  ////////////////////////////////////////////////////////////////////////////////
  // Do everything from detecting card through opening the demo file
  ////////////////////////////////////////////////////////////////////////////////
  void initializeCard(void)

Are you missing a } to close the PrintToSD() functon?

The alreadyBegan variable is not declared and the flushBuffer() function is not defined.