WIP: matlab driver error checking

move to static functions

--CAR
WIP: get the static functions actually working

--CAR