Use basename when name is missing