get null termination right in logging