A fancy version of try_run