Add contract and contract_items func
clear debug str