Split try/except to raise appropriate warnings on bind failures.
Added unbind calls in failure conditions.