Fix up logging a bit