avoid reopen file