Fixed up some logging in stuff