Fixed up logging a little bit