Use require rather than JSON.parse(fs.readFileSync(...).toString())
Make sure we always prompt when needed - so as not to break stdout