Error 52 - Bad file name or number

Bad file name or number - (%ERR_BADFILENAMEORNUMBER) - The file number you gave in a file statement does not match the file number given in an OPEN statement, or the file number may be out of the range of valid file numbers.