Adafruit AdaLogger SD card and RTC not wroking with argon SDfat

I have been trying to make my argon work with Adafruit AdaLogger SD card and RTC to write something to an SD card but it still doesn’t work for some reason
I followed the script in this link example link
I am using an 32GB SD card
My code :

// This #include statement was automatically added by the Particle IDE.
#include <SdFat.h>

// The SD card CS pin on the Adafruit AdaLogger FeatherWing is D5.
const int SD_CHIP_SELECT = D5;
SdFat sd;
unsigned long lastTest = 0;

void tryMeFirst();

void setup() {

void loop() {
	if (millis() - lastTest >= 10000) {
		lastTest = millis();

void tryMeFirst() {
	File myFile;

	// Initialize the library
	if (!sd.begin(SD_CHIP_SELECT, SPI_FULL_SPEED)) {
		Particle.publish("log","failed to open card");

	// open the file for write at end like the "Native SD library"
	if (!"test.txt", O_RDWR | O_CREAT | O_AT_END)) {
		Particle.publish("log","opening test.txt for write failed");
	// if the file opened okay, write to it:
	Serial.print("Writing to test.txt...");
	myFile.println("testing 1, 2, 3.");
	myFile.printf("fileSize: %d\n", myFile.fileSize());

	// close the file:

	// re-open the file for reading:
	if (!"test.txt", O_READ)) {
		Particle.publish("log","opening test.txt for read failed");
	Serial.println("test.txt content:");

	// read from the file until there's nothing else in it:
	int data;
	while ((data = >= 0) {
// 		Particle.publish("log",data);
	// close the file: