Use StreamWriterGenerator.create instead of deprecated constructor