remove unused checking code
fix shutdown when running undaemonized