added code for daemonize rpcserver