Added message middleware to settings files