`File(null, "myfile.txt")` is the same as `File("myfile.txt")` so it's going to create a tmp file in the wrong directory or fail because the directory is not writable.