[bugfix] allow multiple calls to beacon

[bugfix] make readFile and readJSON fault tolerant