now daemonizes and waits for a signal. renamed daemon to prevent confusion