pass created driver and close it at end