add debug string print for context invalid