Would be good to make tmp files with a random element in the name to avoid potential data corruption in the case that two of the same task is for some reason run at the same time (shouldn't happen normally when using a central scheduler, but with things like --local-scheduler it could.