diff --git a/deluge/ui/console/commands/add.py b/deluge/ui/console/commands/add.py
index 7878438..6583d6f 100644
--- a/deluge/ui/console/commands/add.py
+++ b/deluge/ui/console/commands/add.py
@@ -42,7 +42,8 @@
 
 from optparse import make_option
 import os
-import base64
+import base6
+import gio
 
 class Command(BaseCommand):
     """Add a torrent"""
@@ -63,15 +64,25 @@ def handle(self, *args, **options):
         # Keep a list of deferreds to make a DeferredList
         deferreds = []
         for arg in args:
-            if not os.path.exists(arg):
+            filename = os.path.split(arg)[-1]
+            gfile = gio.File(arg)
+
+            if not gfile.query_exists():
                 self.console.write("{!error!}%s doesn't exist!" % arg)
                 continue
-            if not os.path.isfile(arg):
+            if gfile.query_file_type(gio.FILE_QUERY_INFO_NONE) is gio.FILE_TYPE_DIRECTORY:
                 self.console.write("{!error!}This is a directory!")
                 continue
-            self.console.write("{!info!}Attempting to add torrent: %s" % arg)
-            filename = os.path.split(arg)[-1]
-            filedump = base64.encodestring(open(arg, "rb").read())
+            self.console.write("{!info!}Attempting to add torrent: %s" % arg
+
+            try:
+                stream = gfile.read()
+            except gio.Error:
+                self.console.write("{!error!}Torrent was not added! Error while reading stream.")
+            else:
+                filedump = base64.encodestring(stream.read())
+            finally:
+                stream.close())
 
             def on_success(result):
                 self.console.write("{!success!}Torrent added!")
