Hanlded error case in file download