Add error logging.
Remove collection of formats from env['action_dispatch.request.formats'] as not present when page cached by Rack::Cache.