Added try..except to close method to let it gecefully finish even if the
file could not be opened
Moved "sys.exit" to the end of the KeyboardInterrupt exception, so the
watchdog really can get disabled.
Added logging to syslog for events