add support for input directories and output directories instead of only single file