added ENOTDIR check anywhere readJson is used