Execute file outside foreach loop