fix file streaming