code: func openLast(dirpath string) (*os.File, error) {
  	names, err := fileutil.ReadDir(dirpath)
  	if err != nil {
  		return nil, err
  	}
  	names = checkWalNames(names)
  	if len(names) == 0 {
  		return nil, ErrFileNotFound
  	}
  	last := path.Join(dirpath, names[len(names)-1])
  	return os.OpenFile(last, os.O_RDWR, 0)
  }
docs: // openLast opens the last wal file for read and write.