readstring now handle EOF