Print exception but ignore socket errors