Added some scripting to monitor.py