There's nothing in the code snippet you posted that could cause an error like that.
To start with, the ';' at the end of the line acts as a command terminator, although it's unneeded here as a simple newline does the same.
The wget command appears to be working just fine; what's happening is that the shell is seeing something after that as a possible command, and trying to run it... but there's no actual command by that name to run. So there must be something else in the file causing it, either after the semicolon, or on a subsequent line. Perhaps there are even some non-printing characters or something.
So far, the only way I've found to duplicate the error is by adding a quote-protected empty value, such as a variable with nothing in it.
Now for a couple of points of scripting advice for you:
#!/bin/sh is used for interpreting scripts in restricted, posix-compliant lowest-common-denominator mode, and many shell-specific functions may be lost or have their behavior altered. This is mostly recommended for system startup scripts and other cases where portability and standardization are important. When this isn't required, you should use #!/bin/bash (or the path to another shell that has more modern, advanced features available, such as ksh or zsh).
It's usually advisable to separate the code of the script from the data it operates on. Feed the values you want to process into the script from the command line, or store them in a separate file and read that. Or at the very least, set your filenames up at the top of the script in variables first. then use variables in the actual commands later on where the filenames should go. This makes it easier (and safer) to alter the input values without having to go through the whole file making edits.