added support to custom NVM_DIR