add test for daemonize function