ulta sonic data login

i have an ultra sonic sensor and i would like it if it would log the data in a micro sd card. I just got an ethernet shield with the micro sd card slot and im trying to have it put the data on there but when ever i put this line of code in:

File dataFile = SD.open("datalog.txt", FILE_WRITE);

the ultra sonic sensor stops blinking. The code uploads fine, but when i open the serial monitor nothing comes up.

I'm also including the sd.h library and i have been looking at the data logger example

thanks for all the help

will

but when ever i put this line of code in

some other wise mysterious code that I don't show you

the ultra sonic sensor stops blinking

Well, the solution is pretty obvious.

so how could i get it to log data and still use the ultra sonic sensor?

Well, we could all play twenty questions, or you could post your code.
Your choice.

Well, we could all play twenty questions, or you could post your code.
Your choice.

Only partially, OP. Many of us are tired of that game.