update safe delete script