The SS pin referred to in the comment is the SS pin for the Ethernet functionality. The value in the parentheses in the call to SD.begin() is defining which pin is used as the SS pin FOR THE SD CARD.
Different things. The SS pin (pin 10) needs to be defined as an OUTPUT to make SPI work, regardless of whether or not you are using pin 10 as the SS pin for anything.
The code above a no chance to be executed correctly, because CS is defined as 10 in pinmode, but as 4 in SD.begin!!
Have you actually run the code? What failed to be executed properly? You are talking apples and oranges.