modularized logging of steps