The ATGCheck function checks to see if the array has a certain set of characters, and is supposed to break the loop. It does. It all does what it's supposed to. However, after that loop breaks, the output stream is not closing. What am I missing? I'm sure it's something painfully obvious.
Nevermind, I discovered the issue. It was closing the stream. The issue was something else entirely.