Cleaned up the way we generate logs