Just from the code you uploaded, it fails on my Windows PC.
I think it's because your code is reading the config file before it's created and it doesn't exist.
I suspect the file exists on your PC, but it won't on the Android device.
var config = ConfigFile.new()
config.set_value("section", "value", 0)
Obviously that will set the value to 0 when it's first run.