write  a file