updated open-close files