fix bug in read_stock_data in StockClient class and fix IO