added offset parameter to file streaming