task: metadata: install: pip install -e .[dev]
patch: diff --git a/tsdat/utils/get_filename.py b/tsdat/utils/get_filename.py
index 2e017ed..6d32f2b 100644
--- a/tsdat/utils/get_filename.py
+++ b/tsdat/utils/get_filename.py
@@ -32,6 +32,7 @@ def get_filename(
         str: The filename constructed from provided parameters.
 
     ---------------------------------------------------------------------------------"""
-    substitutions = dict(extension=extension.lstrip("."), title=title)
+    substitutions: dict[str, str] = dict()
     substitutions.update(get_fields_from_dataset(dataset))
+    substitutions.update(extension=extension.lstrip("."), title=title)
     return FILENAME_TEMPLATE.substitute(substitutions)

problem_statement: get_filename function replaces title to dataset's title
**Describe the bug**
Tsdat is failing to overwrite the value of title for saving a plot file. 
example code line: plot_file = get_filename(ds, title="wave_data_plots", extension="png")

In this case, the plot_file should have title wave_data_plots but its being set to "cdip.201.c1.20230706.180000.Directional wave and sea surface temperature measurements collected in situ by Datawell DWR-M3 directional buoy located near SCRIPPS NEARSHORE, CA from 2023/07/06 18:00:00 to 2024/07/29 22:56:40..png" where "Directional wave and sea surface temperature measurements collected in situ by Datawell DWR-M3 directional buoy located near SCRIPPS NEARSHORE, CA from 2023/07/06 18:00:00 to 2024/07/29 22:56:40." is dataset's title. 

![image](https://github.com/user-attachments/assets/75cab315-9f53-4729-b713-9f4d54876dd5)
![image](https://github.com/user-attachments/assets/a861b429-3057-4c06-978a-f875c704fe23)

FILENAME_TEMPLATE.substitute(substitutions) results in 'cdip.201.c1.20230706.180000.Directional wave and sea surface temperature measurements collected in situ by Datawell DWR-M3 directional buoy located near SCRIPPS NEARSHORE, CA from 2023/07/06 18:00:00 to 2024/07/29 22:56:40..png'

Repo: Ingest-Oracle 
Pipeline: CDIP
Test: test_cdip_pipeline_rt

Please include the full traceback message (if applicable):
```
E               FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\kaur770\\AppData\\Local\\Temp\\tmpi4xp7qye\\cdip.201.c1.20230706.180000.Directional wave and sea surface temperature measurements collected in situ by Datawell DWR-M3 directional buoy located near SCRIPPS NEARSHORE, CA from 2023\\07\\06 18:00:00 to 2024\\07\\29 22:56:40..png'
```

**Environment** 

- OS: Windows 11
- `tsdat`: 0.8.5


repo: tsdat/tsdat
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/utils/test_get_filename.py b/test/utils/test_get_filename.py
new file mode 100644
index 0000000..81eb1e5
--- /dev/null
+++ b/test/utils/test_get_filename.py
@@ -0,0 +1,29 @@
+import pandas as pd
+import pytest
+import xarray as xr
+
+from tsdat.utils.get_filename import get_filename
+
+
+@pytest.mark.parametrize(
+    ("attrs", "ext", "title", "expected"),
+    (
+        (dict(datastream="test"), "nc", None, "test.20240808.000000.nc"),
+        (dict(datastream="test"), "nc", "title", "test.20240808.000000.title.nc"),
+        (dict(datastream="test", title="title"), "nc", None, "test.20240808.000000.nc"),
+        (
+            dict(datastream="test", title="ds_title"),
+            "nc",
+            "arg_title",
+            "test.20240808.000000.arg_title.nc",
+        ),
+    ),
+)
+def test_get_filename(
+    attrs: dict[str, str], ext: str, title: str | None, expected: str
+):
+    dataset = xr.Dataset(
+        coords=dict(time=pd.date_range("2024-08-08", "2024-08-09", freq="1h")),
+        attrs=attrs,
+    )
+    assert get_filename(dataset, ext, title) == expected