Add warning when socket exception is thrown