Log error when disconnected
Log more when debugging
Merge pull request #31 from YUKAI/feature/more-logging

Feature/more logging