Added method cleanupLog in model to support removing logged pending
command parts in reject contexts.