Tweaked for logging more stuff