Moved chain.doFilter to a finally block to allow exceptions to pass
through