Added hooks and log.