added logging output
for data types greater than 8 bits, we need to divide the raw length by the sizeof(T)