Got server communication working, program segfaults when trying to parse the message in the new txt file in src