Manage streams properly when daemonized