fix run_shell output capture