add logging around extract and apply