Added support to save the image in coreData