Implement documnet location

#1991