tune log with threading

and add thread test
Merge /home/tc/bb
remove unused files