added uniquid code that makes a file with a uniquid if needed, else read from the file