title: How to identify whether a particular file is called first time in C
body: <p>While executing a C program,A debug print should be inserted to a log file (say log.txt),
  but this C program is executed from various places.
  So, multiple logs were found in log.txt</p>
  
  <p>I want that debug to be present only once in the log.txt.
  How to insert a check in C program to achieve the above requirement
  I have tried with static variable, but it works only if for the function called first time
  not the file.
  whether <strong>access function</strong> would help this scenario??</p>