checks for current document
Merge pull request #1 from danielmahon/master

checks for current document