Add error handling for .macromodel and 'kw=$' case
more updates