Updating monitor.py for serial reading