You should change wait 10 to something like wait 30 or wait 50