Daemonization script fixes