Added check for message type
Use of type check in 2_4 and 2_5
Fixed reading according to correct input file
General updates