Added output dir as an option