MOD: modified exception handling for command registration
MOD: extended error output to include commands