SD card random errors with one code but working with other

Hi I am able to write to a 512MB swissbit SD card using a simple code that writes to a text file every 1 s.
But on using the code for AnalogBinLogger@ GitHub - greiman/SdFat: Arduino FAT16/FAT32 exFAT Library, I get random errors.

Please suggest, I read on a different thread that using san disk sd cards might resolve the issue. Please suggest