Fix bug in writeFile in sqlfs.js and remove some debug consle.log calls