move processDirectory into methods.sh now it's more manageable
handle -f --file option