Pretreating the materials before recovery