private OutputStream createInnerOutputStream() {
        try {
            OutputStream fileOutputStream = Files.newOutputStream(
                    file,
                    StandardOpenOption.CREATE,
                    StandardOpenOption.WRITE,
                    StandardOpenOption.APPEND);

            return new BufferedOutputStream(fileOutputStream);
        } catch (final IOException e) {
            throw new UncheckedIOException(e);
        }
    }
Optional file permissions to apply to finished files
stroom-pipeline/src/main/java/stroom/pipeline/destination/RollingFileDestination.java