SD Library Version 1.2.0 problem

I suspect this was the cause of the change:

Try this, change line 62 from:

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

to:

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

Let me know what the results are of that. If this is causing the sketch to not work as expected then I'll try to get it fixed. At the very least the library documentation needs to be updated since it only mentions FILE_READ and FILE_WRITE as valid values for the mode parameter of SD.open().