Log function is passed as argument to runStep(). Fixes #53