Support stdout and stderr redirection on daemonize

When server or worker exists abnormally, it's hard to know what happened since it throws out stdout and stderr.