Improved and fixed command exception message, closes #2301
Fixed  #1969
Possible fix for #2297