Started to add logging