Added support to use existing hooks.

Signed-off-by: ziycon <ziycon.eire@gmail.com>