Supporting graceful signal shutdown.

Adding a signal handler and gracefully shutting down all threads.
I thought the style was for `error`s not logs? I'm not familiar with one for logs?