refactor: reduce complexity of execute_safe_outputs in execute.rs
#313
+71
−84
execute_safe_outputs in execute.rs
#313