Updated event script to allow debug