Stop using a deprecated function.
Fix logging message formatting and move configuring to __main__.

Closes #49