[FLINK-1322] Make Scala API respect WriteMode set in Config