I am able to read the BOM in my program, but facing a bug in the program, as the program execution does not stop after reading the BOM once, it is going into an infinite loop, where it is re-reading the BOM. I am trying to figure out how i can ensure that the program reads th...