Fixing readAndValidateJSON()