improved error checking for safer use of CAT model with binary model files.