console: check for valid file in ConsoleManager::isConsole; some invocations of close() can call this with a NULL pointer.