Fixed file open bug in read_data.c