Since the filename generation is based on the video.ext field, we have to fill it before to check if the file is downloaded. Also do a little code factorisation