Fixed missing extension while saving image