Typically the SD card's SS (Chip Select) pin is 10. Is yours really on pin 4?
const int chipSelect = 4;