closing openFileDialog while file is loading