When is the proper time to send a thank you email to the committee members? After the defense or after getting the certificate confirmation from the registrar office? To me saying thank you after defense is such a nice gesture. I just had a long conversation and question-answer session and everything is still so fresh in the mind of the members! But I would like to know about your suggestion (and probably would like to go with that too!).
After the defense will be fine since by then the committee members have completed their job. What happens between that and when you have the final paper work done is irrelevant. Pointing at the discussion you have just had and finishing with a few personal comments/reflections will be fine. But, do not overdo it since long and talkative mails can be either too long to read or in the worst case seem constructed. So be yourself and be happy for what you have achieved ( I take it you will or have passed?)