Adding debug state output in the monitor. Added dump task for key mem.