can daemonize and write pid