fix use size from file stat for stream