You are trying to access an indexed file which you have not opened.
Open the file in the relevant access mode and then retry the unsuccessful file operation.