trying different filewrite methods