Added sleep and next to rescan script