added debug flag checks for removing/adding extra info