last-minute scripting+troubleshooting stuff