Solve problem about the selection of file