Changed log output to stderr.
Add extra error message when releasing device.
Set wireless device type to prevent a memory leak on disconnect.