Now the program will check if the downloaded file is valid.