Extract command to start SFN into separate function
diff --git a/localstack/services/stepfunctions/stepfunctions_starter.py b/localstack/services/stepfunctions/stepfunctions_starter.py
index d1139000824d0..3f7f158b88b13 100644
--- a/localstack/services/stepfunctions/stepfunctions_starter.py
+++ b/localstack/services/stepfunctions/stepfunctions_starter.py
@@ -11,12 +11,7 @@
 MAX_HEAP_SIZE = '256m'
 
 
-def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
-    port = port or config.PORT_STEPFUNCTIONS
-    install.install_stepfunctions_local()
-    backend_port = DEFAULT_PORT_STEPFUNCTIONS_BACKEND
-    # TODO: local port is currently hard coded in Step Functions Local :/
-    backend_port = 8083
+def get_command():
     lambda_endpoint = aws_stack.get_local_service_url('lambda')
     dynamodb_endpoint = aws_stack.get_local_service_url('dynamodb')
     sns_endpoint = aws_stack.get_local_service_url('sns')
@@ -27,6 +22,16 @@ def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
            '--sqs-endpoint %s --aws-region %s --aws-account %s --step-functions-endpoint %s') % (
         install.INSTALL_DIR_STEPFUNCTIONS, MAX_HEAP_SIZE, lambda_endpoint, dynamodb_endpoint,
         sns_endpoint, sqs_endpoint, aws_stack.get_region(), TEST_AWS_ACCOUNT_ID, sfn_endpoint)
+    return cmd
+
+
+def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
+    port = port or config.PORT_STEPFUNCTIONS
+    install.install_stepfunctions_local()
+    backend_port = DEFAULT_PORT_STEPFUNCTIONS_BACKEND
+    # TODO: local port is currently hard coded in Step Functions Local :/
+    backend_port = 8083
+    cmd = get_command()
     print('Starting mock StepFunctions (%s port %s)...' % (get_service_protocol(), port))
     start_proxy_for_service('stepfunctions', port, backend_port, update_listener)
     return do_run(cmd, asynchronous)
diff --git a/localstack/utils/common.py b/localstack/utils/common.py
index 5c60b266811fd..e3286e7dd99c0 100644
--- a/localstack/utils/common.py
+++ b/localstack/utils/common.py
@@ -593,7 +593,7 @@ def download(url, path, verify_ssl=True):
     s = requests.Session()
     r = s.get(url, stream=True, verify=verify_ssl)
     # check status code before attempting to read body
-    if r.status_code != 200:
+    if r.status_code >= 400:
         raise Exception('Failed to download %s, response code %s' % (url, r.status_code))
 
     total = 0

Extract command to start SFN into separate function.