Problem with serially writing from MATLAB to Arduino

I'm trying to serially input a string of characters using fwrite in Matlab and read it serially from the Arduino. This worked just fine.
But then , I added a SD card functionality to the Arduino and store the read information in the SD card. Even after adding the SD library, I was able to fwrite from Matlab but when I added the File Write function to the SD card, MATLAB is no longer being able to fwrite or fprintf?
I think it has something to do with locking of the serial COM port. But I don't exactly know what's going wrong?

me neither, maybe time to post the code you use?