updates and remove pathlib usage
updates and remove path lib