added fopenTag()
write count2 in paint