hashPassword function refactored to return promise
readJsonFile function refactored to return promise