app.js fixed reading json files and json output