Fix changes not being committed
Add debug messages