problem with loading data from SD

HI,
why I cant print data from structure in setup()? In function applySetting I am printing it normally.
What am I doing wrong? Thanks

#include <SD.h>
#include <ctype.h>
File myFile;
/*
station = station1
mode = 0
temp = 0
humidity = 0
detection = 0*/
String station2;

struct parameters {
  String station;
  int mode;
  int temp;
  int humidity;
  int detection;
} settings;
// Setting for SD-card reader
const int chipSelect = 10;

void getSettings()
{
  char character;
 String settingName;
 String settingValue;
 myFile = SD.open("settings.txt");
 if (myFile) {
 while (myFile.available()) {
 character = myFile.read();
 while(character != '='){
 settingName = settingName + character;
 character = myFile.read();
 }
 character = myFile.read();
 while(character != '\n'){
 settingValue = settingValue + character;
 character = myFile.read();
 if(character == '\n'){
 
 //Debuuging Printing
 Serial.print("Name:");
 Serial.println(settingName);
 Serial.print("Value :");
 Serial.println(settingValue);
 
 // Apply the value to the parameter
 applySetting(settingName,settingValue);
 // Reset Strings
 settingName = "";
 settingValue = "";
 }
 }
 }
 // close the file:
 myFile.close();
 } else {
 // if the file didn't open, print an error:
 Serial.println("error opening settings.txt");
 }

 }
 
 void applySetting(String settingName, String settingValue) {
   
   if(settingName == "station") {
   //station2=settingValue;
   settings.station = settingValue;
   //Serial.println(station2);
   Serial.println(settings.station);
 }
   if(settingName == "mode") {
 settings.mode=settingValue.toInt();
 }
 if(settingName == "temp") {
 settings.temp=settingValue.toInt();
 }
 if(settingName == "humidity") {
 settings.humidity=settingValue.toInt();
 }
 if(settingName == "detection") {
 settings.detection=settingValue.toInt();
 }
 }
 
void setup()
{
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  Serial.println("Starting...");
  pinMode(10, OUTPUT);
  
  if (!SD.begin(chipSelect)) {
    Serial.println("initialization failed!");
    return;
  }
  
  getSettings();
  //Serial.print(station2);
  Serial.println(settings.station);
  Serial.println(settings.temp);
  Serial.println(settings.humidity);
  Serial.println(settings.detection);
  Serial.println(settings.mode);
  
}

void loop()
{
	// nothing happens after setup
}

It won’t even compile for me under Arduino 1.6.1. You have to put #include <SPI.h> before #include <SD.h>

Do you get any of your serial output which may indicate where things are going wrong?