Thread management // Graceful exiting implemented. About to scrap the current parsing and tokenize by \n instead