Refactoring, add runConfig
Fix bug
Modify to write log