remove immature optimize
put scan directories task to other thread