fix error on loading config files&add an debug options