Start logging code.
Updating tests.
Add more protections in various place