diff --git a/src/finn/core/execute_custom_node.py b/src/finn/core/execute_custom_node.py
index e936bf4ca9e85ca73451f7e41cbfd8a9f6b81883..e1afa3347b92692547f9018483a7c81336d08931 100644
--- a/src/finn/core/execute_custom_node.py
+++ b/src/finn/core/execute_custom_node.py
@@ -1,5 +1,8 @@
 # import onnx.helper as helper
 import sys
+import os
+import tempfile
+import numpy as np
 import finn.core.multithreshold as multiThresh
 import finn.core.utils as util
 import finn.backend.fpgadataflow.code_gen_for_single_node_execution as code_gen
@@ -11,8 +14,18 @@ def execute_custom_node(node, context, graph):
 
     if (util.get_by_name(node.attribute, 'backend')) is not None:
         if node.op_type == "StreamingMaxPool":
+            in_ind = 0
+            temp_files = []
+            for inputs in node.input:
+                np.save("input_{}.npy".format(in_ind), context[inputs].astype(np.float32))
+                temp_files.append("input_{}.npy".format(in_ind))
+                in_ind += 1
             code_gen.execute(node, context, graph)
-            sys.exit(0)
+            
+            # deleting temporary files
+            for temp_file in temp_files:
+                os.remove(temp_file)
+            sys.exit(1)
         else:
             # exception if op_type is not supported
             raise Exception("This hls lib custom node is currently not supported.")