Improved checks in check_new_name