Added detection for yet-opened files