if the raw_msg is nil, print error message instead of crash