-- added extra layer for dealing with writing files to pass to command line