Add support for pre and post hooks

Signed-off-by: Hector Acosta <hector.acosta@gmail.com>