You need to change this line:
if (!card.init() ||
to:
if (!card.init(speed, chipSelectPin ) ||
Where
uint8_t SdCard::init ( uint8_t speed,
uint8_t chipSelectPin
)Initialize a SD flash memory card.
Parameters:
[in] speed Set SPI Frequency to F_CPU/2 if speed = 0 or F_CPU/4 if speed = 1.
[in] chipSelectPin SD chip select pin number.Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
In your case chipSelectPin is 4 and first try speed = 0.
You don't need this but it won't hurt:
pinMode(10, OUTPUT);