fix one bug of openfile