max msg size is read from file and msg length is checked before sendding a msg