move file processing into a function, print help