Wifi Sheild Arduino plus keypad

Now I want to Save some information to the SD memory.

When I download the ReadWrite file from the SD memory library, it's working properly.

Now, when I integrate the SD memory code, with the keypad and a barcode scanner code, the SD card does not get initialised. "Initializing SD card...initialization failed!
"

How to solve the problem ?