Add daemonizing code