fix problem with pathlib call