fixed the main logging conditional to make sense.