If there is an error, 'I' will not be increased, and an infinite loop will happen because the same index will be used in the next iteration: and fail, and loop. ?
Add 'Finally' block and move "I++" to that? or initialize 'I' to -1 and move "I++" before the function call. ?
Even if it didn't loop forever,on error 'I' won't be incremented, so 'I' won't correctly correspond to the next item in the list.