Ensure the device is charged to at least 50% to prevent it from shutting down mid-flash.