Deleted obsolete variables causing a NullPointerException
Added controlled shutdown of concurrent listeners
improved logging and shutdown procedure
inserted forgotten newline
inserted ending line