Add extract subgraph option to driver