diff --git a/mtools/util/cmdlinetool.py b/mtools/util/cmdlinetool.py
index <HASH>..<HASH> 100644
--- a/mtools/util/cmdlinetool.py
+++ b/mtools/util/cmdlinetool.py
@@ -8,7 +8,6 @@ import os
 from dateutil.tz import tzutc
 
 from mtools.version import __version__
-from mtools.util.profile_collection import ProfileCollection
 from mtools.util.logfile import LogFile
 
 try:
@@ -18,6 +17,8 @@ try:
         from pymongo import Connection
         from pymongo.errors import ConnectionFailure, AutoReconnect, OperationFailure, ConfigurationError
 
+    from mtools.util.profile_collection import ProfileCollection
+
     class InputSourceAction(argparse.FileType):
         """ This class extends the FileType class from the argparse module. It will try to open
             the file and pass the handle to a new LogFile object, but if that's not possible it
The import of ProfileCollection needs to happen inside of the outer try: statement for a fallback to simple argparse.FileType for InputSourceAction.
Fixes #<I>.