Changed check for the returned parameter from ESP_ERR_NVS_PART_NOT_FOUND to ESP_ERR_NVS_NOT_INITIALIZED.