updated removal logic for failed/skipped tests