Updated loadModel function

Updated loadModel function to work even in case-sensitive systems