logging, slight refinement