-change: using the Tempfile to create a random path, but using a File to write the data (because Tempfiles get deleted after execution finishes)