Add create path test and fix some old code