I did not check if the file produces the right results, I only looked at the code.
The code does contain sufficient help and even an example. However, it does not have an H1 line meaning that you cannot use 'lookfor' to find the file in the future when you have forgotten the exact filename
It also does not contain any code to check if the input and output arguments are valid.
Furthermore, some code can be improved. Look at the suggestions of the M-lint checker and see if you can change the code.