Add basic logging
Fix unchecked warning