index.js: work with or without fs.exists