Cobra 2 SD Card error

I’m using the beta sdk but have been getting this with the previous sdk as well and i don’t know why i get this if it am i doing something wrong?


 string[] vlonm = Mainboard.GetStorageDeviceVolumeNames();
                            if (vlonm[0] == "SD") //make sure there is an SD card inserted
                            {
                                if (File.Exists(@ "\SD\data.TXT"))
                                {
//do some code
}
}


Exception System.IO.IOException - CLR_E_INVALID_DRIVER (22)

#### Message: 
#### Microsoft.SPOT.IO.NativeIO::GetAttributes [IP: 0000] ####
#### System.IO.File::Exists [IP: 001a] ####
#### SASS_Field_Data_Logger.Program::XbeeGetData [IP: 0287] ####

A first chance exception of type ‘System.IO.IOException’ occurred in Microsoft.SPOT.IO.dll

How are you powering the board? Have you tried a different SD card?

external 12 v 1.5 a supply.
havent tried using a different card.
this only happen the second time i run the the example code;the first time executes fine

If remove and reinsert SD the second time, does it work?

no still get this error

Exception System.IO.IOException - CLR_E_INVALID_DRIVER (17)

#### Message: 
#### Microsoft.SPOT.IO.NativeIO::GetAttributes [IP: 0000] ####
#### System.IO.File::Exists [IP: 001a] ####
#### SASS_Field_Data_Logger.Program::XbeeGetData [IP: 0288] ####

A first chance exception of type ‘System.IO.IOException’ occurred in Microsoft.SPOT.IO.dll

Is this through gadgeteer or plain NETMF? Please show complete but simple program that we can try on our end.