Add configure logging and exception handlers.

Signed-off-by: crynobone <crynobone@gmail.com>