Fixed #99 - added dialog close logic to the watchdog process