add logging in /var/log/syslog
stop tor only when the state file is actually changed