Output directory can now be specified