When I do scripts like that I modify it to skip the download step and keep the old file around so I can test the rest without anything time-consuming.