This should still use `with` so the file gets closed.