diff --git a/pulsar/client/staging/up.py b/pulsar/client/staging/up.py
index 4cd0c8716bb76788b97236cc180877817b234f79..1db85b0bdd89fbec3c72b9185704efaba4d4f0ab 100644
--- a/pulsar/client/staging/up.py
+++ b/pulsar/client/staging/up.py
@@ -116,6 +116,7 @@ class FileStager(object):
 
         self.new_working_directory = job_config['working_directory']
         self.new_outputs_directory = job_config['outputs_directory']
+        self.new_tool_directory = job_config.get('tools_directory', None)
         # Default configs_directory to match remote working_directory to mimic
         # behavior of older Pulsar servers.
         self.new_configs_directory = job_config.get('configs_directory', self.new_working_directory)
@@ -138,7 +139,17 @@ class FileStager(object):
         return separator
 
     def __initialize_referenced_tool_files(self):
+        # Was this following line only for interpreter, should we disable it of 16.04+ tools
         self.referenced_tool_files = self.job_inputs.find_referenced_subfiles(self.tool_dir)
+        # If the tool was created with a correct $__tool_directory__ find those files and transfer
+        new_tool_directory = self.new_tool_directory
+        if not new_tool_directory:
+            return
+
+        for potential_tool_file in self.job_inputs.find_referenced_subfiles(new_tool_directory):
+            local_file = potential_tool_file.replace(new_tool_directory, self.tool_dir)
+            if exists(local_file):
+                self.referenced_tool_files.append(local_file)
 
     def __initialize_referenced_arbitrary_files(self):
         referenced_arbitrary_path_mappers = dict()
diff --git a/pulsar/client/transport/curl.py b/pulsar/client/transport/curl.py
index 6056e0f048d78c513102f4ba2f4767290cd49b52..02ff12c547c0a3fb9934c46ea4dcaf727b9e2a28 100644
--- a/pulsar/client/transport/curl.py
+++ b/pulsar/client/transport/curl.py
@@ -116,6 +116,7 @@ def _new_curl_object():
     except NameError:
         raise ImportError(PYCURL_UNAVAILABLE_MESSAGE)
 
+
 def _error_curl_to_pulsar(code):
     if code == pycurl.E_OPERATION_TIMEDOUT:
         return PulsarClientTransportError.TIMEOUT
diff --git a/setup.cfg b/setup.cfg
index 6611969ddd2a657e24880b2cdd77bd769804aec2..5639e92a4ab4691e8182818607e0d7e89fa829b6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,5 +7,5 @@ logging-filter=pulsar,paste
 logging-level=INFO
 [flake8]
 max-line-length = 150
-max-complexity = 9
+max-complexity = 10
 exclude = pulsar/util/pastescript