Flashed photon and it went offline forever

HELP!

I just uploaded a minor change to a photon that is in a remote location and it went offline and does not show any heartbeat or anything at all.
I tried to see if my code had a problem so I flashed the same code into another photon that I have here and it worked ok.

  1. How can I get back online my remote photon?
  2. How can I ensure that this never happens again? Some watchdog that resets itself after a while or anything?

photons should never go offline forever, I am worried about this since I have several units in remote locations and they need updates.