trying to fix openFile dialog crash the program