stdout/stderr capture for #23