Fixed the problem with handling unknown name_type ("-")
Added message logging code. Log messages are to be added yet.