Tried to fix the model.createImageFromFile

There is something that I dont understand about this
Changed a little the model.addFromCatalog

I think this way is easier to read, though I think there are lots of things to improve