wait for File.closed?   
  the program night hang..??