Added error handling for Windows machins (STDIN.read_nonblock issue?)