Problem with reading sensor

Google the site for FreeMemory(). Start getting rid of libraries you don't really need. Start with the Streaming one. The SD card doesn't care whether the data gets there because of one function call or 12 function calls.