I want to download gzip after downloading txt file. So I am checking whether the txt file is exists and creating gzip file. This is the code I am using.