better error messages, unique name check