added function to see if file is finished downloading, added another logging statement