Adding missing ErrorBean and introducing debug mode