separate check for the opened files