* fix bug, check length of path at first.