Fixed error message
Added query api for grains and fixed yaml/jinja error code