President warns security agencies against torture