Add output interface

Add output interface.
Add thread handler of badiu search

Add thread handler of badiu search.