Fix resolve variable failing on old style.
enable custom stats, will move to new file format

also work on a unified error handler.
Capture errors in boot and commands

also code cleanup run