Switched to using BindException and ConnectException instead of SecurityException