Extract doc; use logging