Everything works OK but I needed to add DoEvents.

Code:
webBrowser.Navigate(inputFile);
Application.DoEvents();
It seems that Navigate spawns a thread and I now force it to complete.