Defect-induced band gap states and the contact charging effect in wide band gap insulators