Bot download last day file

Their is one bot who runs every day,when it fails the next day it download the file who has previous day data i.e if it runs today thn it will create a CSV file where the data is to be 01/12/2022 but in the file the data is 30/11/2022 bcz it failed yesterday bcz of server issue