small fixes related to file download

* wrong namespace for NODE_ENV variable access
* use name variable instead of 'file' to select file to download with binaries