much faster writeFile using go chan.