amendments to monitor script