Update probe_script.py

Add some function instead of a brutal use of the script and add a try.