move "probe" function to the top of the script, that it can be found in any case