fix stdout/stderr log redirection