changed adding files to stream until the end (so we can add other data vars