SD card not working with Arduino Mega Pro

Hello
I am working on project that takes the readings from my sensors and sends to thingspeak. Previously I was using an Arduino Mega for this. I have a temperature sensor, Turbidity sensor and SD card. The sd card was getting Vcc from arduino Mega and it was working perfectly fine. I had followed the connections that were mentioned online, with MISO, SCK , MOSI , CS pins being connected to properly. But the size of arduino mega is quite large and I had to make a compact PCB so I ended up using Arduino Mega 260 pro. I connected it exactly the same way, to the same pins but now the SD card dosen't log the data. What could be wrong? The code is the same but now the while debugging it just outputs OOPS SD card writing failed.
Please help

did you run the CardInfo example of the SD library? what does it print?

Actually I just soldered on the SD card module as the previous circuit was working just fine. Guess I should have checked it first