fix openFile()