fixed bug in target image filename