Honestly, I'm not sure how you aren't receiving errors. I believe you're receiving a style of undefined behavior though. After you read in from infile, you close it, then you continue to call your other functions and attempt to read lines from it. Your list should already store every number from the file, why attempt to continue to read it?
Remove the getline functions from your functions aside from the one in read from file. This should fix your issue.