I figured it out. I found that my code has 3-4 times the number of loops required. SO I adjusted the number or repeating loops while loading the VRML into my Cortona control
Cortona control performs VRML scene download asynchronously. The OnSceneLoaded event is fired after the download process is complete. There is no need in any kind of "wait loops", just make your application listen to this event.