added try except so writing the truth catalog works with astropy pyfits or older pyfits. this is sort of to make sure it still works on the cosmos machines until I update my astropy version