Added more checking for stderr in run_with_timeout