Fix crash when open file, loop in DoLoad