Add exception hanlder for quiting driver