unbuffered i/o for faster key press response
avoid race conditions