put registerBeforeHandler-check from register to boot