read message file and wrap message information in a structure