quick mods to support CLOSE_WRITE