Added open file open index and close