daemonize process with pid file