A loop in the secondary file does not work