raise error if generate_root is not provided
rename generate_root to gen_root