The bug of config tool fixed
little changes of order
The not-closing-file bug fixed