Problem with reading sensor

Which Arduino are you running this code on? For a 328-based Arduino, the SD library takes up more than 1/4 of the memory, because it actually writes to the card in 512 byte chunks.

The streaming library also use a fair amount of memory holding the data to be streamed.

My suspicion is that you are running out of memory.