added consoleGetFD function