Add output parameter

So that we can save files to a path.