"fs = require('fs');" to "var fs = require('fs');"