Fixed a small issue

If the index folder does not exist, a new one will be created when
constructing…