fixed loading default document from environment variable