Switched to logging based on Python logging