added better option setup for "output dir" along with output file