Add addition check that message read correctly or check end of file