Ensure id is str before getting id file/dir