Let's see whether adding this: ```r on.exit({ p$kill() }) ``` can avoid to have taken ports if any of the function crash.