Using 2n2222 to switch relay on/off with 3.3v

To guarantee the MOSFET is fully off during powering up, and when powered down. Until the pin driving the MOSFET gate is set to be an output it will be floating, which is bad news.