wrapper to use fs function in node.js easily