revised logging routine