How do you create a new file using file picker and write to it?

See also here: