My objective is to copy a file from one SD card to another SD card. To achieve that, I have connected two 16 GB MicroSD cards to Arduino Mega 2560 using 2 Tf Card Memory Shields(Please refer the image below)

As my intention is to communicate with 2 SD cards, I used SPI protocol with CS pins as 04 and 10(and even tried many other digital pins).
My pin connections between SD Module and Arduino Mega are like below
GND - GND
vcc - vcc
MISO - 50
MOSI - 51
SCK - 52
CS1 - 10
CS2 - 04
And my code is like below (My code here doesn't do much except initialization, but even this fails)
#include <SPI.h>
#include <SdFat.h>
#include <string.h>
SdFat SD;
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("Initializing SDFat SPI card...");
//SPI.begin();
pinMode(10, OUTPUT);
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
if (!SD.begin(10)) {
Serial.println("initialization 10 failed!");
} else {
Serial.println("initialization 10 done.");
}
digitalWrite(10, HIGH);
digitalWrite(4, LOW);
if (!SD.begin(4)) {
Serial.println("initialization 4 failed!");
} else {
Serial.println("initialization 4 done.");
}
if (1 == 1) {
return;
}
}
void loop()
{
}
The versions of SdFat library(by Bill Greiman) that I tried with are 1.1.4, 1.1.3 and 1.0.1.
Other steps that I tried
1. I tested these 2 sheilds separately- by connecting only one at a time, and they both work fine.Moreover, in this mode, I could also access files in them - so there is no issue in either sd cards, or card modules
2. Tried also SD library instead of SdFat
3. Downgraded and upgraded SdFat library to different versions
4. Tried the same code on Arduino Uno, with Uno specific SPI pin configurations. Even that approach did not result in any positive outcome.
5. Tried with both 3.3 V and 5V voltage input to SD card modules
6. Formatted both the cards to FAT16, and even to FAT 32 (formatted the cards with Windows formatting option, also used SdFormatter example of SdFat library)
7. Tried using other digital ports 7, 8, 9, 53 etc..
8. Tried by commenting digitalWrite(4, HIGH); digitalWrite(10, LOW); digitalWrite(4, LOW); digitalWrite(10, HIGH); from the code
9. Uncommented SPI.begin() and tried
10. Also tried TwoCards example of SdFat library
I am still not sure what I am missing. Kindly help me overcome this issue.
Thank you in advance for your time and consideration.