add struct ts_config for configure libts, remove all exit()