Add env mode in Mog + fix exception handling in kernel
Enhance exception logs