Added code to check if "cmd" attribute is valid or not. This is to make error report...