read file before passing into uglifyjs to comress