support command line options.
process files in specified dir