added documentation directory checking