Incorporate "predict state all" check into "predict_script.rb"