Add output at the top of the foreach loop to make debugging easier