President castigates judges at annual judicial meet