catch error message in if server can't get port