fix if clause run_or_pickle module