diff --git a/build.py b/build.py
index 9db178e..cff086d 100755
--- a/build.py
+++ b/build.py
@@ -14,8 +14,12 @@ import pytz
 import requests
 
 config = configparser.ConfigParser()
-config.read("config")
 
+config_file_path = os.path.expanduser(
+    os.path.join(os.getenv("XDG_CONFIG_HOME", "~/.config"), "bug-chart", "config")
+)
+assert os.path.exists(config_file_path)
+config.read(os.path.expanduser(config_file_path))
 
 Bug = dict[str, typing.Any]
 CallParams = dict[str, str | int]
@@ -48,7 +52,7 @@ def download_bugs(state: str) -> list[Bug]:
 
 def get_all_bugs() -> list[Bug]:
     """Get all bugs."""
-    filename = "all_bugs.json"
+    filename = config.get("output", "cache")
     if os.path.exists(filename):
         with open(filename) as fh:
             return typing.cast(list[Bug], json.load(fh))