Implement "BeforeHandler" hook.