Consider following function
suspend fun writeToStream(osw: OutputStreamWriter, text: String) = withContext(Dispatch