End stream when going to next file