fix a bug of opening a file