Removed myfiles.tif file. Now the images are being stored in Memory_Images.tif file