Complete file scanner function.

1. Code re-arch.
2. Fix some bugs.
3. Re-wirte black hole's config file.

Signed-off-by: ycchen <ytu_cyc@126.com>