engine: add lots of logging to Engine.CheckForWork