this can be done in another improvement, my goal was to provide a non intrusive patch and preserve the current behavior
the $exit_code, could be used in the future for any other part
but if you prefer I rename that variable and only used it in that scope ?