Better logging in engine.
part of #130.