title: Modelica: when initial print only once
body: <p>I have the following Modelica code, inside a component that is used several times in a system model:</p>
  
  <pre><code>parameter fileName = "world.log"
  equation  
    when initial() then
      if not Modelica.Utilities.Files.exist(fileName) then
        Streams.print("Hello World", fileName);
      end if;
    end when;
  </code></pre>
  
  <p>I would expect to find exactly one line of code in the created file, but instead there are usually 5 or more lines printed, but sometimes it seems to work as expected. Using Dymola 2019 on Windows 10. 
  Can someone clarify what is going on? The file existance check seems to be unreliable!?</p>