Take the exit-code into account to determine the port to print messages to