Updates to add logging