better logging of data