fixes issue with logging array of non-utf8 data