Error Dialog is defined but never used