Only close loaded_files if loaded_files exists in RealGalaxyCatalog
Merge branch 'master' of github.com:GalSim-developers/GalSim