Windows workaround: to avoid getLine blocking