Path.exists() and Path.resolve() do not work consistently with each other if the current working directory is deleted after Python is launched. For example, if I open a Python 3.13.0 interpreter ...
os.path.join (folder, filename) ensures the path is correct for the system. On Windows, it uses backslashes (reports\summary.txt); on Linux and macOS it uses forward slashes (reports/summary.txt).
I've had a problem for years where every time I install a new version of Python into a new directory using the .exe installer from python.org, the installer deletes all the main Python files, such as ...
Package your Python applications for redistribution with one click, no compiling, and almost no additional software.