There’s a really great article on the PhotoFocus website by on how to take care of your flash cards.
I’d like emphasize his Tip #7 about not inserting or removing a flash card with the camera turned on. On my Nikon D-90 there is a little green light that flashes whenever I turn the camera off. As long as that light is on the camera may be accessing the card so IT IS NOT SAFE TO INSERT OR REMOVE THE FLASH CARD! I always wait for it to turn off.