Minor fixes to toc window open
Fixed bug where toc did not find input file