title: Using TextIO.Write to create new bucket if isn't exist in Google Cloud Dataflow
body: <p>I'm trying to check a file created in a ParDo is different to a stored in the GCS.</p>
  
  <p>To do this I try to read the file and compare their differences.</p>
  
  <pre><code>        Pipeline p = Pipeline.create(c.getPipelineOptions());
          try {
              PCollection&lt;String&gt; lines = p.apply(
                      TextIO.Read
                              .named("Read Section on GS")
                              .from("gs://failbucket/foo/boo/ret.txt"))
                      .apply(ParDo
                              .of(new Util.viewDifferences2(c.element))
                              .named("only different"));
  
              lines.apply(
                      TextIO.Write.named("Write Document Different")
                              .to(pathGS)
                              .withSuffix(".json"));
  
              p.run();
  
          } catch (Exception e) {
              p = Pipeline.create(c.getPipelineOptions());
              PCollection&lt;String&gt; lines = p.apply(Create.of(sectionContent));
  
              lines.apply(TextIO.Write.named("Write new Document")
                      .to("gs://failbucket/foo/boo/ret").withSuffix(".txt"));
              p.run();
          }
  </code></pre>
  
  <p>Initially the file does not exist so Exception but when try created have this message "Output path does not exist or is not writeable"</p>
  
  <p>Do you know how I can create entire new path?</p>
  
  <p>Thank you</p>