I think here we'd want a nonce also (e.g. timestamp) because otherwise if someone runs the same app twice the files will overwrite eachother.