Revert promise changes and move to fs.js