Something I also tend to do:
If the script uses any hard-coded values (for example how many times to re-try after a likely failure, or the format definition of an output string) then declare them all in a block near the top of the script, for example just before/after verifying the input.
This avoids hidden unnamed "magic" numbers or strings. In practice I found that this also makes it much easier to convert such a value into an argument should this become necessary.
Also, when a change is needed, you do not have to touch the main body of the code, reducing the risk of introducing a bug