[configtool] use dispose instead of finalize in some place