add logging to help debug