Anomaly detection script skeleton