Fix error when downloadFile is null