add debug flow for logging bad tokens