Added support args for after and before hooks depends on #1005

#1005