Wrap middleware for exception handling
Add rack middleware insertion into Railtie