fixed exception handling. removed some unused imports
Merge pull request #2 from nio-blocks/exception

fixed exception handling. removed some unused imports