Tiny fixup of deviceFileHandle
Fix nasty illegal read error. Typo in for-loop.
Add support for ncurses output