log errors
clean the counts output