Handle additional failure cases and "redo" in "predict_script.rb"