To avoid struggling with reset button during software development, I defined an IFTTT DO button to enterSafeMode after a debug run. This generated a slew of IFTTT error notifications. My guess is the Electron shuts down before completing IFTTT handshaking. To fix this, I set a counter and let loop decrement it so that it loops a few times (5) before executing the enterSafeMode(). If practicle, the Electron should ensure a clean termination.