fix logging in daemon mode, but daemons still broken