Fix some logging and todo