More work on daemonization