Added flush on stdout when daemonizing process.