Daemon: fix check log file in daemon mode