docs: protected OutputStream initOutput(final File file)
          throws MojoExecutionException {
          // stream to return
          final OutputStream stream;
          // plenty of things can go wrong...
          try {
              // directory?
              if (file.isDirectory()) {
              throw new MojoExecutionException("File "
                  + file.getAbsolutePath() + " is directory!");
              }
              // already exists && can't remove it?
              if (file.exists() && !file.delete()) {
              throw new MojoExecutionException("Could not remove file: "
                  + file.getAbsolutePath());
              }
              // get directory above file file
              final File fileDirectory = file.getParentFile();
              // does not exist && create it?
              if (!fileDirectory.exists() && !fileDirectory.mkdirs()) {
              throw new MojoExecutionException(
                  "Could not create directory: "
                      + fileDirectory.getAbsolutePath());
              }
              // moar wtf: parent directory is no directory?
              if (!fileDirectory.isDirectory()) {
              throw new MojoExecutionException("Not a directory: "
                  + fileDirectory.getAbsolutePath());
              }
              // file file is for any reason not creatable?
              if (!file.createNewFile()) {
              throw new MojoExecutionException("Could not create file: "
                  + file.getAbsolutePath());
              }
              // finally create some file
              stream = new FileOutputStream(file);
          } catch (FileNotFoundException e) {
              throw new MojoExecutionException("Could not find file: "
                  + file.getAbsolutePath(), e);
          } catch (IOException e) {
              throw new MojoExecutionException("Could not write to file: "
                  + file.getAbsolutePath(), e);
          }
          // return
          return stream;
      }