Changed all printf to DEBUG. Change %d to %zd on size_t.