flawed, but better method of getting stderr without blocking