prevent reopen the log file more than once on resources loading/reloading