add lock file support to Daemon