Fixed DocumentCheck, it should be all set now... with the logic