Umm, sorry I am still kind of new to Corona. This seems really complicated in my opinion. I just use the two functions given but from my experience I just do something like this if it helps.
I just load the file and if it is empty it create the defaults for the variables. If this doesn’t help you just let me know and I can see what I can do 
[lua]
local json = require(“json”)
– Function to save a table. Since game settings need to be saved from session to session, we will
– use the Documents Directory
local json = require(“json”)
function saveTable(t, filename)
local path = system.pathForFile( filename, system.DocumentsDirectory)
local file = io.open(path, “w”)
if file then
local contents = json.encode(t)
file:write( contents )
io.close( file )
return true
else
return false
end
end
function loadTable(filename)
local path = system.pathForFile( filename, system.DocumentsDirectory)
local contents = “”
local myTable = {}
local file = io.open( path, “r” )
if file then
– read all contents of file into a string
local contents = file:read( “*a” )
myTable = json.decode(contents);
io.close( file )
return myTable
end
return nil
end
local score = 0
local gameData = loadTable(“gameData.json”)
if gameData == nil then
gameData = {}
gameData.highscore = 0
end
highscore = gameData.highscore
[/lua]