We don't want to use the template_dir as the working dir.
So, move the save the doc method to the class to override this.