Replacing the os change working directory with pathlib and rename all the internal functions accordinly