The Karnataka High Court on Tuesday came down heavily on the State police and the Home Department over the manner in which two criminal cases were registered against a doctor-activist who had allegedly helped the police identify illegal Bangladeshi immigrants residing in Bengaluru.