error checking for model path