Added extension to image name creation