Setting customErrors mode