SD Library Version 1.2.0 problem

Try this:

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