Add before hooks.