Update API with pathlib.Path support