improved error logging for recursive refresh