Switching from stty to termios