Try npm coding style. Log in uniqueId if idCounter not done fetching value from file.
Refactoring