const fs = require('fs');
const content = fs.readFileSync('dist/server.cjs', 'utf8');

const searchTerms = ['writeFileSync', 'writeFile', 'custom_profiles', 'saveProfile'];
searchTerms.forEach(term => {
  let idx = 0;
  while ((idx = content.indexOf(term, idx)) !== -1) {
    console.log(`\nFound "${term}" at index ${idx}:`);
    console.log(content.substring(idx - 100, idx + 500));
    idx += term.length;
  }
});
