Added Encoding checks
todo: found end of message