pathlib usage is now preferred over os.path. We should update the codebase to use this lib.
pathlib
os.path