Added Output Middleware