SD Library Version 1.2.0 problem

Replacing:

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

with:

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

is not the solution, sketch stops and the Serial monitor shows:
"error opening datalog.txt"