Better for this function to get a reader 
and to warp it with two different functions one for stream and one for fiel.