Added a function to monitor globals