add try-except block for file download