change the pause to 10000 which will make the script more stable.