Add document title and use it when saving to file.