update stdout/stderr