Added beforeRouting interrupt feature and test