stream: if requested size is more than file size, set it to file size