some refinements and log outputs