Reorder includes, use proper logging