[PIO-211] Fix pio deploy fail when using HDFS model storage
diff --git a/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala b/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala
index 011cd95..1d2eaaa 100644
--- a/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala
+++ b/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala
@@ -80,8 +80,9 @@
 
   private def stringFromFile(filePath: String): Option[String] = {
     try {
-      val fs = FileSystem.get(new Configuration())
-      val path = new Path(new URI(filePath))
+      val uri = new URI(filePath)
+      val fs = FileSystem.get(uri, new Configuration())
+      val path = new Path(uri)
       if (fs.exists(path)) {
         Some(new String(ByteStreams.toByteArray(fs.open(path)).map(_.toChar)))
       } else {