Write data out to file on target argument
Add tests to support new writing to target path
Merge saving of output to file