add a loop when wget fails
cleanup