refactoring around main() function.
Merge branch 'spike-log-type-refactor' of github.com:tri-star/tigrep into spike-log-type-refactor