Changed loop declaration and clean file