That's never happened to me. Do you use two memory cards, one for raw and one for jpeg? Pulling out a card and closing the battery door might appear to do that, when you close the door, the record mode and card that is being written to will switch. When you replace the card, it will not switch back.