Aligned template images are named like this when they are saved: aligned_img_Roman_TDS_simple_model_H158_226_17.fits.gz
So, if you use the same template more than once (which you do if you have more than one observation on a light curve), this file gets overwritten.