Redesign program logic, 3 thread.
Depatch kpi generation and kpi upload to child modules.
Add parameter parser.