close stdout/stderr