Problem with GPS data logger

 while (ss.available() > 0)
    gps.encode(ss.read());

The encode() method returns true or false, based on whether the character you passed it completes a sentence, or not. You should NOT be ignoring that value. You should NOT be writing to the SD card if you are not getting good data.

You SHOULD be printing the character to the serial port as well as passing it to the encode() method, so you have some idea whether the simple act of connecting the SD card (which uses more than just pin 8 ) to the Arduino has affected the GPS's ability to deliver good data.

I can tell you, for a fact, that it has. If YOU did some research, and determined what kind of device your SD card reader/writer is (Hint: SPI) and which pins it needed to operate (Hint: 10, 11, 12, and 13), you'd have a clue as to what the problem is.