my suggestion included adding a filename to the path. the path is a folder. what you want is create a file, not a folder. the filename to be added to the path is partially or fully, the
String value of the unique id.
what you are doing now is correct, except that you are directly saving and reading the path itself, which is a folder.
you should write or read 'a file', not a folder.
example, path is 'c:/'. if id is 1, add like,'1.obj' to the path, making it 'c:/1.obj'.