Fix bugs : 1. when git flag not exists, 2. add base path