remove duplicated code (daemonize.h and singleton.h)