Fix KGW
Cosme
Add logging