Daemon implementation