diff --git a/get_file.go b/get_file.go
index <HASH>..<HASH> 100644
--- a/get_file.go
+++ b/get_file.go
@@ -18,8 +18,13 @@ func (g *FileGetter) ClientMode(u *url.URL) (ClientMode, error) {
 		path = u.RawPath
 	}
 
+	fi, err := os.Stat(path)
+	if err != nil {
+		return 0, err
+	}
+
 	// Check if the source is a directory.
-	if fi, err := os.Stat(path); err == nil && fi.IsDir() {
+	if fi.IsDir() {
 		return ClientModeDir, nil
 	}
 
diff --git a/get_file_test.go b/get_file_test.go
index <HASH>..<HASH> 100644
--- a/get_file_test.go
+++ b/get_file_test.go
@@ -166,6 +166,15 @@ func TestFileGetter_percent2F(t *testing.T) {
 	}
 }
 
+func TestFileGetter_ClientMode_notexist(t *testing.T) {
+	g := new(FileGetter)
+
+	u := testURL("nonexistent")
+	if _, err := g.ClientMode(u); err == nil {
+		t.Fatal("expect source file error")
+	}
+}
+
 func TestFileGetter_ClientMode_file(t *testing.T) {
 	g := new(FileGetter)
Error is returned early if file source does not exist