re-added exception catch in run_program