better logging for datawriter