updating the Timeout function to fix a random kill issue (global-function.sh)