Problems with writing data on SD card - GPS logger

Not an expert by any means, but I'm also debugging other aspects of using SD cards and can share some thoughts.

First thing's first of course: have you confirmed the SD card even works (do the read/write examples work)?

Specifically regarding the pulling the SD card out makes data spit out: that's happening because (I don't know which specifically) some of the SD library APIs are blocking calls. Having the card in makes those calls block infinitely because it's failing, therefore stopping the rest of your code (the serial prints...etc) from executing.