add c# filestream function