make sure doc.root exists before calling find on it