Added debugging to record deletion