better error handling for mistakes in mergeModels.m