added console log for route middleware