redirect stdout and error for daemonization