Modify trap script