Fixes, add logging