add printf debug to collect_box