Improve handling for missing file case
Fix missing close statement for reader instance
Improve handling for different running mode of QuadUI