Only get currentDoc when we use cwd