add extension for file name to pass the check.

I realized that the sourceFileName is appended with TEMP_RANDOM_SUFFIX and random string to make it unique. However, in this way, it doesn't end with a valid extension. So I append its extension after the random string. I not sure if it is the correct answer.