Redirect output outside of subshell