finish writing png file