!!HELP!! SD Library on Nano don't write anything to SD card!!!

I am writing code for my GPS logger and find i can't write to SD card!
This code can successfully create a file on the SD, but the file will always be blank! I always remember to dataFile.flush() at the end of each entry written.
The demo code in SD library works fine on my nano. And There are at least 400 bytes free ram on my nano so memory shouldn't be the cause.

Please help me!!!

I am writing code for my GPS logger

but I'm not going to show it to you.

This code can successfully create a file on the SD, but the file will always be blank!

You should probably write to it, then.

I always remember to dataFile.flush() at the end of each entry written.

But, do you ever close the file?