Implemented handling of exceptions on starting TCP listener.