Home Sports Leclerc survives late scare to take pole position