Fix crash

* Extracted out some methods for readability
* Removed handling for NPE because there was no occurence for the same since a month, so seems like it wasn't legitimate, instead of this added some null checks where we feel this might occur, and logged the same
* handleAccept throws an IOException only if something is wrong with the server socket channel
* handleAcceptedSocket catches all local IOExceptions, and logs them