Check existence of directory before generate DB