Fix Bugs and using fts funtion traverse dirctory