Add function tgt_config and change arguments order of function is_tgt_valid_after and is_tgt_ok