think Im having a conflict in the loop section with the (Serial.println). That is just a guess.
No such thing as a conflict with a serial print.
You should only have serial begin once in the sketch in the setup.
if (!myFile.open("codes.txt", O_READ))
Has no braces, do you mean to only skip that first line if the condition is not met?